package com.lhh.springcommon.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lhh.springcommon.entity.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhh.springcommon.entity.vo.CommentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 李厚航
 * @since 2025-02-25
 */
@Mapper
public interface CommentMapper extends BaseMapper<Comment> {

    /**
     * 分页查询一级评论
     * @param comment
     * @param page
     * @return
     */
    Page<CommentVO> queryPageComment(@Param("comment") Comment comment, Page<Comment> page);

    /**
     * 分页查询二级评论
     * @param commentVO
     * @param page
     * @return
     */
    Page<CommentVO.TwoCommentVO> queryPageTwoComment(@Param("commentVO") CommentVO commentVO, Page<CommentVO> page);

}
